<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Dhara: include/parser.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Dhara
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">parser.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="parser_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &lt;fstream&gt;</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &lt;algorithm&gt;</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#ifndef PARSER_H</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#define PARSER_H</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;  <span class="comment">// Parse a configuration file</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;  <span class="comment">// @param   fileName The name of the file to parse</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;  <span class="comment">// @return  none</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="parser_8h.html#a1ce00f2a415010b43b1ea0c370b79677">ParserConfigFile</a>(std::string fileName);</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;  std::string <a class="code" href="parser_8h.html#a367ee1cbd911e78775aa22e8c9d2413e">GetOptionToString</a>(std::string key);</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;  <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="parser_8h.html#af7dac1dc7780ab229a92e08d56b18ee0">GetOptionToChar</a>(std::string key);</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;  <span class="keywordtype">int</span> <a class="code" href="parser_8h.html#a947c0ec72bbb2964d3adff8fbbf21fe4">GetOptionToInt</a>(std::string key);</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;  <span class="keywordtype">double</span> <a class="code" href="parser_8h.html#a98bd6be40f0ff45d11e2428a0de2022d">GetOptionToDouble</a>(std::string key);</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;  </div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;  std::string <a class="code" href="parser_8h.html#ad1eec20e7697906820ed07c2ae631a0f">ParseName</a>(std::string value);</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;  std::string <a class="code" href="parser_8h.html#adc3bdbf87cc8bac72c4eaa7f3ce2bfd0">ParseValue</a>(std::string value);</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;  std::string <a class="code" href="parser_8h.html#acbc9630bbabbfed7cd97b5e30f6b3261">Trim</a>(std::string str);</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;  std::string <a class="code" href="parser_8h.html#a1ec1463dafb2311bffbb3258f7fa2b0c">RTrim</a>(std::string str);</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;  std::string <a class="code" href="parser_8h.html#a2774f0cb49ae7b9abe7ab255fd3d984d">LTrim</a>(std::string str);</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#endif  // PARSER_H</span></div><div class="ttc" id="parser_8h_html_af7dac1dc7780ab229a92e08d56b18ee0"><div class="ttname"><a href="parser_8h.html#af7dac1dc7780ab229a92e08d56b18ee0">GetOptionToChar</a></div><div class="ttdeci">const char * GetOptionToChar(std::string key)</div><div class="ttdef"><b>Definition:</b> parser.cc:109</div></div>
<div class="ttc" id="parser_8h_html_adc3bdbf87cc8bac72c4eaa7f3ce2bfd0"><div class="ttname"><a href="parser_8h.html#adc3bdbf87cc8bac72c4eaa7f3ce2bfd0">ParseValue</a></div><div class="ttdeci">std::string ParseValue(std::string value)</div><div class="ttdef"><b>Definition:</b> parser.cc:195</div></div>
<div class="ttc" id="parser_8h_html_acbc9630bbabbfed7cd97b5e30f6b3261"><div class="ttname"><a href="parser_8h.html#acbc9630bbabbfed7cd97b5e30f6b3261">Trim</a></div><div class="ttdeci">std::string Trim(std::string str)</div><div class="ttdef"><b>Definition:</b> parser.cc:211</div></div>
<div class="ttc" id="parser_8h_html_a947c0ec72bbb2964d3adff8fbbf21fe4"><div class="ttname"><a href="parser_8h.html#a947c0ec72bbb2964d3adff8fbbf21fe4">GetOptionToInt</a></div><div class="ttdeci">int GetOptionToInt(std::string key)</div><div class="ttdef"><b>Definition:</b> parser.cc:132</div></div>
<div class="ttc" id="parser_8h_html_a1ec1463dafb2311bffbb3258f7fa2b0c"><div class="ttname"><a href="parser_8h.html#a1ec1463dafb2311bffbb3258f7fa2b0c">RTrim</a></div><div class="ttdeci">std::string RTrim(std::string str)</div><div class="ttdef"><b>Definition:</b> parser.cc:226</div></div>
<div class="ttc" id="parser_8h_html_a367ee1cbd911e78775aa22e8c9d2413e"><div class="ttname"><a href="parser_8h.html#a367ee1cbd911e78775aa22e8c9d2413e">GetOptionToString</a></div><div class="ttdeci">std::string GetOptionToString(std::string key)</div><div class="ttdef"><b>Definition:</b> parser.cc:88</div></div>
<div class="ttc" id="parser_8h_html_a2774f0cb49ae7b9abe7ab255fd3d984d"><div class="ttname"><a href="parser_8h.html#a2774f0cb49ae7b9abe7ab255fd3d984d">LTrim</a></div><div class="ttdeci">std::string LTrim(std::string str)</div><div class="ttdef"><b>Definition:</b> parser.cc:218</div></div>
<div class="ttc" id="parser_8h_html_a1ce00f2a415010b43b1ea0c370b79677"><div class="ttname"><a href="parser_8h.html#a1ce00f2a415010b43b1ea0c370b79677">ParserConfigFile</a></div><div class="ttdeci">void ParserConfigFile(std::string fileName)</div><div class="ttdef"><b>Definition:</b> parser.cc:48</div></div>
<div class="ttc" id="parser_8h_html_ad1eec20e7697906820ed07c2ae631a0f"><div class="ttname"><a href="parser_8h.html#ad1eec20e7697906820ed07c2ae631a0f">ParseName</a></div><div class="ttdeci">std::string ParseName(std::string value)</div><div class="ttdef"><b>Definition:</b> parser.cc:179</div></div>
<div class="ttc" id="parser_8h_html_a98bd6be40f0ff45d11e2428a0de2022d"><div class="ttname"><a href="parser_8h.html#a98bd6be40f0ff45d11e2428a0de2022d">GetOptionToDouble</a></div><div class="ttdeci">double GetOptionToDouble(std::string key)</div><div class="ttdef"><b>Definition:</b> parser.cc:155</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
